[Top] [Prev] [Next] [Bottom]
[Contents]
Changing CGIs into Application Servers
The changes required fall into the categories of
- These new functions (found in
SaApi.h
) take the same parameters as the standard C functions but will send output correctly whether the Sapphire/Web server application is CGI, Web Cartridge, NSAPI, ISAPI, or whatever. - Other standard C output functions should be converted to an (Sa... function).
- You could make sure that your code cleans up after itself. If you cannot do so due to limitations that Sapphire generated CGIs produce, you can switch your memory allocation calls to
SaMalloc
which takes the same parameters as malloc
. Memory allocated with this call should not then be free
'd, since Sapphire/Web will clean up this memory after each request. The call SaFree
can be used to clean up allocated memory sooner, if that is needed, but in general using SaMalloc
will require no cleaning up.
- You must never mix calls to
malloc()
and free()
with calls to SaMalloc()
and SaFree()
! This is a recipe for catastrophe !
Oracle Web Cartridges
For information on converting CGI programs to Oracle Web Cartridges, see the chapter on Web Cartridges.
[Top] [Prev] [Next] [Bottom]
[Contents]
info@bluestone.com
Copyright © 1997, Bluestone. All rights
reserved.